Skip to content

chore: Allow magic value comparisons in test files#6

Merged
Jan-Frederik Schmidt (g3n35i5) merged 1 commit intorelease/2.Xfrom
chore/disable-ruff-rule-tests
Apr 7, 2026
Merged

chore: Allow magic value comparisons in test files#6
Jan-Frederik Schmidt (g3n35i5) merged 1 commit intorelease/2.Xfrom
chore/disable-ruff-rule-tests

Conversation

@g3n35i5
Copy link
Copy Markdown
Member

@g3n35i5 Jan-Frederik Schmidt (g3n35i5) commented Apr 1, 2026

Disable Ruff rule PLR2004 for test files to allow magic value
comparisons, which are standard practice in test assertions
(e.g., "assert len(list) == 5").

This rule is overly restrictive for test code where hard-coded
expected values are common and expected.

Disable Ruff rule PLR2004 for test files to allow magic value
comparisons, which are standard practice in test assertions
(e.g., `assert len(list) == 5`).

This rule is overly restrictive for test code where hard-coded
expected values are common and expected.
@g3n35i5 Jan-Frederik Schmidt (g3n35i5) changed the title chore: Relax linting rules in tests to accommodate common testing patterns chore: Allow magic value comparisons in test files Apr 1, 2026
@g3n35i5 Jan-Frederik Schmidt (g3n35i5) marked this pull request as ready for review April 1, 2026 13:53
@g3n35i5 Jan-Frederik Schmidt (g3n35i5) merged commit 7c61728 into release/2.X Apr 7, 2026
@g3n35i5 Jan-Frederik Schmidt (g3n35i5) deleted the chore/disable-ruff-rule-tests branch April 7, 2026 10:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant